<MPSCNNInstanceNormalizationDataSource >(3) | MetalPerformanceShaders.framework | <MPSCNNInstanceNormalizationDataSource >(3) |
<MPSCNNInstanceNormalizationDataSource >
#import <MPSCNNInstanceNormalization.h>
Inherits <MPSNNGradientStateNSObject>, and <NSCopying>.
(float *__nullable) - gamma
(float *__nullable) - beta
(NSString *__nullable) - label
(MPSCNNNormalizationGammaAndBetaState *__nullable) -
updateGammaAndBetaWithCommandBuffer:instanceNormalizationStateBatch:
(BOOL) - updateGammaAndBetaWithInstanceNormalizationStateBatch:
(float) - epsilon
(void) - encodeWithCoder:
(nullable instancetype) - initWithCoder:
(nonnull instancetype) - copyWithZone:device:
NSUInteger numberOfFeatureChannels
BOOL supportsSecureCoding
Return a pointer to an array containing the beta terms.
Optional copy method to create a copy of the data source for use with a new device.
Parameters:
Returns:
Optional NSSecureCoding compatibility.
An optional tiny number to use to maintain numerical stability. output_image = (input_image - mean[c]) * gamma[c] / sqrt(variance[c] + epsilon) + beta[c]; Defalt value if method unavailable: FLT_MIN
Return a pointer to an array containing the gamma terms.
A label that is transferred to the instance normalization filter at init time Overridden by a MPSCNNInstanceNormalizationNode.label if it is non-nil.
Compute new gamma and beta values using current values and gradients contained within a MPSCNNInstanceNormalizationStateBatch. This is for use in the context of training a network within a MPSNNGraph. If you are writing your own graph using the low level interface or aren't training instance normalization it isn't needed.
In this mathod, you should perform the update on a GPU, because at the time it is called the data isn't in the state objects yet and the CPU can't do the work. You should not attempt to update the MPSCNNInstanceNormalization kernel directly with the results. The state object returned from the function will be used for that. A batch of states will be passed in. You should accumulate the gradients and then update the weights.
This operation is expected to also decrement the read count of instanceNormalizationStateBatch by 1, if the states are temporary.
Parameters:
Returns:
Compute new gamma and beta values using current values and gradients contained within a batch MPSCNNInstanceNormalizationState objects. Perform the update on the CPU.
Parameters:
Returns:
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |